package com.bj58.mis.apm.collector.host;

import com.bj58.mis.apm.client.core.BaseCollectLog;
import com.google.gson.Gson;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class HostModel extends BaseCollectLog {
    private Map<String,Double> cpu=new HashMap<String,Double>();
    private Map<String,String> cpuInfo=new HashMap<String,String>();
    private Map<String,Double> mem=new HashMap<String,Double>();
    private Map<String,Double> swap=new HashMap<String,Double>();
    private Map<String,String> networkconfig=new HashMap<String,String>();
    private Map<String,Long> networkstat=new HashMap<String,Long>();
    private Map<String,Long> procStat=new HashMap<String,Long>();
    private Map<String,String> selfPs=new HashMap<String,String>();
    private List<Map<String,String>> ps=new ArrayList<Map<String,String>>();
    private List<Map<String,Double>> cpuCoreInfo=new ArrayList<Map<String,Double>>();
    private List<Map<String,String>> df=new ArrayList<Map<String,String>>();

    private String username="";
    private String computerName="";
    private String userDomain="";
    private String computerHostName ="";
    private String osname="";
    private String osarch="";
    private String osversion="";

    public String getOsname() {
        return osname;
    }

    public void setOsname(String osname) {
        this.osname = osname;
    }

    public String getOsarch() {
        return osarch;
    }

    public void setOsarch(String osarch) {
        this.osarch = osarch;
    }

    public String getOsversion() {
        return osversion;
    }

    public void setOsversion(String osversion) {
        this.osversion = osversion;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getComputerName() {
        return computerName;
    }

    public void setComputerName(String computerName) {
        this.computerName = computerName;
    }

    public String getUserDomain() {
        return userDomain;
    }

    public void setUserDomain(String userDomain) {
        this.userDomain = userDomain;
    }

    public String getComputerHostName() {
        return computerHostName;
    }

    public void setComputerHostName(String hostName) {
        this.computerHostName = hostName;
    }

    @Override
    public String getCollectType() {
        return "host";
    }

    public enum Item{
        DF,CPU,MEM,NET,PROCSTAT,SELFPS,PS
    }

    private List<Item> exclude=new ArrayList<Item>();

    @Override
    public String toString() {
        Gson gson=new Gson();
        return gson.toJson(this);
    }

    public Map<String, Long> getProcStat() {
        return procStat;
    }

    public Map<String, String> getSelfPs() {
        return selfPs;
    }

    public List<Map<String, String>> getPs() {
        return ps;
    }

    public Map<String,String> getCpuInfo() {
        return cpuInfo;
    }

    public List<Map<String, Double>> getCpuCoreInfo() {
        return cpuCoreInfo;
    }

    public List<Item> getExclude() {
        return exclude;
    }

    public Map<String, Double> getCpu() {
        return cpu;
    }

    public Map<String, Double> getMem() {
        return mem;
    }

    public Map<String, Double> getSwap() {
        return swap;
    }

    public Map<String, String> getNetworkconfig() {
        return networkconfig;
    }

    public Map<String, Long> getNetworkstat() {
        return networkstat;
    }

    public List<Map<String, String>> getDf() {
        return df;
    }


}
